﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using XCI.Windows;

namespace startup.Test
{
    public partial class FrmPagination : BaseForm
    {
        public int a = 1;
        public string b = "1";

        public FrmPagination()
        {
            InitializeComponent();
        }

        private void Frm_Load(object sender, EventArgs e)
        {
            ////分页改变事件,在此事件中加载数据,完成后更新状态和消息
            //pagination1.PageChanged += (s, p) =>
            //{
            //    Debug.WriteLine($"PageIndex={p.PageIndex},PageSize={p.PageSize}");
            //    pagination1.SetTotal(128);
            //};

            //pagination1.PageMessage = "{StartIndex}-{EndIndex} {PageIndex}/{TotalPage} of {Total} items";
            ////指定要加载的页码
            //pagination1.SetPage(1);
        }

        private void Button1_Click(object sender, EventArgs e)
        {
            //pagination1.SetPage(100);
            pagination1.SetTotal(200);
        }

        private void Button2_Click(object sender, EventArgs e)
        {
            //pagination1.SetPage(3);
            pagination1.SetTotal(300);
        }
    }
}